package com.mes.biz.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mes.common.annotation.Excel;
import com.mes.common.core.domain.BaseEntity;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 售后单对象 biz_after_sale_order
 * @author hwg
 * @email hwg
 * @date 2023-09-23
 */
@Data
public class BizAfterSaleOrder extends BaseEntity<BizAfterSaleOrder>
{
    private static final long serialVersionUID = 1L;

    /** 销售单id */
    @Excel(name = "销售单id")
    @NotBlank(message = "销售单id不允许为空")
    @LogField
    @FieldRemark(name = "销售单id",field = "orderId")
    private String orderId;

    /** 售后单编号 */
    @Excel(name = "售后单编号")
    @LogField
    @FieldRemark(name = "售后单编号",field = "saleOrderCode")
    private String saleOrderCode;

    /** 售后日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "售后日期", width = 30, dateFormat = "yyyy-MM-dd")
    @LogField
    @FieldRemark(name = "售后日期",field = "saleOrderDate")
    private Date saleOrderDate;

    @Excel(name = "售后处理描述")
    @LogField
    @FieldRemark(name = "售后处理描述",field = "remarkA")
    private String remarkA;

    /** 售后日期开始 */
    private String beginSaleOrderDate;

    /** 售后日期结束 */
    private String endSaleOrderDate;

    /** 处理人 */
    @Excel(name = "处理人")
    @LogField
    @FieldRemark(name = "处理人",field = "processUserId")
    private String processUserId;

    /** 收费金额 */
    @Excel(name = "收费金额")
    @LogField
    @FieldRemark(name = "收费金额",field = "feedAmount")
    private BigDecimal feedAmount;

    /** 租户id */
    @Excel(name = "租户id")
    @LogField
    @FieldRemark(name = "租户id",field = "tenantId")
    private String tenantId;

    /** 状态 0待处理1已派单2已处理 */
    @Excel(name = "状态 0待处理1已派单2已处理", dictType = "sys_normal_disable")
    @LogField
    @FieldRemark(name = "状态 0待处理1已派单2已处理",field = "status")
    private String status;

    private String orderNumber;
    private String customerName;
    private String address;
    private String phone;
    private String installUser;
    private String processUserName;
    private String accountCode;
    /**
     * 客户反馈图片
     */
    private List<BizAfterSaleOrderAttach> saleOrderAttaches;

    /**
     * 售后反馈图片
     */
    private List<BizAfterSaleOrderAttach> afterSaleOrderAttaches;

    /**
     * 安装图片
     */
    private List<BizOrderAttach> installerAttaches;


    public void setOrderId(String orderId)
    {
        this.orderId = orderId;
    }

    public String getOrderId()
    {
        return orderId;
    }

    public void setSaleOrderCode(String saleOrderCode)
    {
        this.saleOrderCode = saleOrderCode;
    }

    public String getSaleOrderCode()
    {
        return saleOrderCode;
    }

    public void setSaleOrderDate(Date saleOrderDate)
    {
        this.saleOrderDate = saleOrderDate;
    }

    public Date getSaleOrderDate()
    {
        return saleOrderDate;
    }

    public void setProcessUserId(String processUserId)
    {
        this.processUserId = processUserId;
    }

    public String getProcessUserId()
    {
        return processUserId;
    }

    public void setFeedAmount(BigDecimal feedAmount)
    {
        this.feedAmount = feedAmount;
    }

    public BigDecimal getFeedAmount()
    {
        return feedAmount;
    }

    public void setTenantId(String tenantId)
    {
        this.tenantId = tenantId;
    }

    public String getTenantId()
    {
        return tenantId;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public List<BizAfterSaleOrderAttach> getSaleOrderAttaches() {
        return saleOrderAttaches;
    }

    public void setSaleOrderAttaches(List<BizAfterSaleOrderAttach> saleOrderAttaches) {
        this.saleOrderAttaches = saleOrderAttaches;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getInstallUser() {
        return installUser;
    }

    public void setInstallUser(String installUser) {
        this.installUser = installUser;
    }

    public String getProcessUserName() {
        return processUserName;
    }

    public void setProcessUserName(String processUserName) {
        this.processUserName = processUserName;
    }

    public List<BizAfterSaleOrderAttach> getAfterSaleOrderAttaches() {
        return afterSaleOrderAttaches;
    }

    public void setAfterSaleOrderAttaches(List<BizAfterSaleOrderAttach> afterSaleOrderAttaches) {
        this.afterSaleOrderAttaches = afterSaleOrderAttaches;
    }

    public List<BizOrderAttach> getInstallerAttaches() {
        return installerAttaches;
    }

    public void setInstallerAttaches(List<BizOrderAttach> installerAttaches) {
        this.installerAttaches = installerAttaches;
    }

    public String getAccountCode() {
        return accountCode;
    }

    public void setAccountCode(String accountCode) {
        this.accountCode = accountCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("saleOrderCode", getSaleOrderCode())
            .append("saleOrderDate", getSaleOrderDate())
            .append("processUserId", getProcessUserId())
            .append("feedAmount", getFeedAmount())
            .append("tenantId", getTenantId())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
